1. Field of the Invention
The present invention relates to an apparatus for and method of coding an image, and more particularly to a technique to specify appropriate data of quantization width for quantization of a dynamic image or a static image.
2. Description of the Related Art
Conventional standards for motion-picture coding, such as ITU-TH.264, ISO/IEC MPEG-2, allow compression of high quality image through selection of the most appropriate coding mode or quantization parameter for each coded block, which is called a macroblock, according to the properties of the coded block.
More specifically, the most basic quantizing technique for image compression sets a smaller quantization step, which is a quantization parameter, for a macroblock which is determined to have a higher level of importance, and a larger quantization step for a macroblock which is determined to have a lower level of importance, thereby trying to achieve enhanced coding efficiency and improved image quality.
Proposals have been made to correct the quantization parameter in consideration of human visual characteristics. For example, “International Organisation for Standardisation TestModel Editing Committee, 1993. Test Model 5. April. ISO-IEC/JTC1/SC29/WG11/NO400” (hereinafter also referred to as first literature) proposes calculating an activity of an input image and correcting the quantization step so that the quantization step for flat areas is made smaller, considering the human visual characteristics that human visual system is more sensitive to distortions in flat areas.
Another image coding method utilizing a certain human perceptual characteristic is disclosed, for example, in Japanese Patent Application Laid-Open No. 2003-284071 (hereinafter also referred to as second literature). The method includes steps of conducting a modeling so that image quality lowers from a target area towards a background area, and correcting a quantization parameter according to the result of modeling.
Though the method described in the first literature intends to reduce quantization distortion in areas where attention of viewers tends to focus by setting a smaller quantization step for the flat area in the image frame, the area to which the viewer actually focuses attention is quite often not the flat area in the image frame. For example, if the image frame includes a human face image against a relatively flat background, the viewer is expected to focus more on the human face image rather than the flat background. In addition, the human visual characteristics allow men to perceive only a limited area in detail. Hence, for the enhancement of image quality, an area to which the viewer's attention focuses in the image frame needs to be prioritized. The method of the first literature, however, relatively increases the quantization step for the focused area, thereby deteriorating the subjective image quality of the focused area.
On the other hand, the method according to the second literature though enhances the image quality of the focused area by relatively decreasing the quantization step of the focused area, relatively increases the quantization step of the flat background thereby strengthening the quantization distortion in the flat background which is easily perceived. Thus, the method according to the second literature also deteriorates overall subjective image quality.